package org.kgc.alanhealth.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName hospital_reply
 */
@Data
public class HospitalReply implements Serializable {
    /**
     * 评论id
     */
    private Integer commentsid;

    /**
     * 
     */
    private String username;

    /**
     * 回复时间
     */
    private Date recoverytime;

    /**
     * 回复内容
     */
    private String content;

    /**
     * 头像路径
     */
    private String picpath;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalReply other = (HospitalReply) that;
        return (this.getCommentsid() == null ? other.getCommentsid() == null : this.getCommentsid().equals(other.getCommentsid()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getRecoverytime() == null ? other.getRecoverytime() == null : this.getRecoverytime().equals(other.getRecoverytime()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getPicpath() == null ? other.getPicpath() == null : this.getPicpath().equals(other.getPicpath()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCommentsid() == null) ? 0 : getCommentsid().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getRecoverytime() == null) ? 0 : getRecoverytime().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getPicpath() == null) ? 0 : getPicpath().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", commentsid=").append(commentsid);
        sb.append(", username=").append(username);
        sb.append(", recoverytime=").append(recoverytime);
        sb.append(", content=").append(content);
        sb.append(", picpath=").append(picpath);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}